package com.etooling.framework.service;

import com.etooling.framework.entity.AttachFile;
import com.etooling.framework.entity.FileResource;
import com.etooling.framework.repository.AttachFileRepository;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

public interface FileUploadSaveService {

    AttachFile upload(AttachFileRepository attachFileRepository, MultipartFile uploadFile, FileResource fileResource, Boolean isEncrypt) throws Exception;

    AttachFile upload(AttachFileRepository attachFileRepository, MultipartFile uploadFile, FileResource fileResource, Boolean isEncrypt, Map<String, String> limitMap) throws Exception;

    AttachFile uploadByte(AttachFileRepository attachFileRepository, String fileName, byte[] image, FileResource fileResource, Boolean isEncrypt) throws Exception;

    AttachFile uploadXinDi(AttachFileRepository attachFileRepository, MultipartFile uploadFile, FileResource fileResource, Boolean isEncrypt) throws Exception;
}
